Hello, I currently use this code to read from doors module a specific view and write a XML file (not all code shown)
Module mod = read("/mypath/mymodule", true);
View vw = view("Safety_ExportAndCheck");
...
...
Object oObj = null
for oObj in mod do { // all objects in module
out << "<record>\n";
Column cCol = null
for cCol in mod do {
string attr = attrName(cCol);
if(!null attr) {
//string s = replace(attr,"Object ","");
string s = replace(attr," ","_");
out << "<" s ">"; // name of attribute
AttrType att = null;
AttrDef ad = find (module(oObj), attr);
// value
if(attr == "Object Level"){ // special Level
out << level oObj ""
}
else if(attr "" == "Object Number" ""){ // special Number
out << number oObj ""
}
else{ // as is
}
Now the problem is that I need a extra column in this existing view, only in my script since the view "as is" may be used by others. Actually, I need two extra columns "Object ID" and "URL" which i presume both are special (not custom). How can I insert them in my XML? Thank you in advance,
RMalcovich - Wed Apr 05 03:04:11 EDT 2017 |
Re: Doors DXL, add column to existing view Hmm, solved.
out << "<Object_Identifier>" identifier oObj "</Object_Identifier>\n";
out << "<Object_URL>" getURL(oObj) "</Object_URL>\n";
|